<!DOCTYPE HTML >
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>聊天室</title>
    <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    <style>
        body {
            margin-top: 5px;
        }
    </style>

    <script src="utils/WebIMConfig.js"></script>
    <script src="js/websdk3.1.4.js"></script>
    <script src="js/EMedia_x1v1.js"></script>

    <script src="utils/jquery-3.4.1.js"></script>
    <!-- 引入IM 初始化文件÷-->
    <script src="utils/initWeb.js"></script>
    <script src="easmeob-im/login.js"></script>
    <script src="easmeob-im/message.js"></script>
    <script src="easmeob-im/friend.js"></script>
    <script src="easmeob-im/group.js"></script>
    <script src="easmeob-im/chatroom.js"></script>
    <script src="easmeob-im/webrtc.js"></script>
    <script src="easmeob-im/confrence.js"></script>
</head>
<body>
<div class="container">
    <div class="row">
        <div class="col-md-3">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="panel-title">注册或登录环信im</h3>
                </div>
                <div class="panel-body">
                    <input type="text" class="form-control" id="name"/><br>
                    <button id="register" type="button" class="btn btn-primary">注册</button>
                    <button id="login" type="button" class="btn btn-primary">登录</button>
                    <button id="logout" type="button" class="btn btn-primary">退出</button>
                </div>
            </div>
            <div class="panel panel-primary" id="online">
                <div class="panel-heading">
                    <h3 class="panel-title">接收消息用户</h3>
                </div>
                <div class="panel-body">
                    <input type="text" class="form-control" id="toName"/><br>
                </div>
            </div>
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="panel-title">群发系统广播</h3>
                </div>
                <div class="panel-body">
                    <input type="text" class="form-control" id="msg2"/><br>
                    <button id="broadcast" type="button" class="btn btn-primary">发送</button>
                </div>
            </div>
        </div>
        <div class="col-md-9">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="panel-title" id="talktitle"></h3>
                </div>
                <div class="panel-body">
                    <div class="well" id="log-container" style="height:400px;overflow-y:scroll">

                    </div>
                    <input type="text" id="msg" class="form-control col-md-12"/> <br>
                    <button id="privateText" type="button" class="btn btn-primary">发送</button>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    var uname,          //登陆ID
        nickname,       //用户名
        upwd,           //登陆密码
        msgContent,     //消息内容
        toID,           //接收方ID，好友/群组 相关操作ID
        mid,            //消息ID
        cursor,         //分页获取群组的的 cursor
        gid,            //群组ID
        gFileId,        //群文件ID
        gType,          //判断群组类型
        roomType,       //判断聊天室类型
        userMember,     //member 成员信息
        userStream,     //用于接收用户视频流
        confrenceId,    //会议ID，用于直接加入
        confrencePwd    //会议密码，用于直接加入
    //获取 name 值
    $("#name").bind("input propertychange", function (event) {
        uname = $("#name").val()
    });
    //获取 pwd 值
    $("#pwd").bind("input propertychange", function (event) {
        upwd = $("#pwd").val()
    });
    //获取 msgContent 值
    $("#msg").bind("input propertychange", function (event) {
        msgContent = $("#msg").val()
    });
    //获取 toID 值
    $("#toName").bind("input propertychange", function (event) {
        toID = $("#toName").val()
    });
    //获取 msgId 值
    $('#msgId').bind("input propertychange", function (event) {
        mid = $("#msgId").val()
    })
    //获取 groupId 值
    $('#groupId').bind("input propertychange", function (event) {
        gid = $("#groupId").val()
    })
    //获取 gCursor 值
    $('#gCursor').bind("input propertychange", function (event) {
        cursor = $("#gCursor").val()
    })
    //获取 gFileId 值
    $('#gFileId').bind("input propertychange", function (event) {
        gFileId = $("#gFileId").val()
    })
    //获取 gType 值
    $('#gType').bind("input propertychange", function (event) {
        gType = $("#gType").val()
    })
    //获取 rType 值
    $('#rType').bind("input propertychange", function (event) {
        roomType = $("#rType").val()
    })
    // 获取 confrenceId 值
    $('#confrenceId').bind("input propertychange", function (event) {
        confrenceId = $("#confrenceId").val()
    })
    //获取 confrencePwd 值
    $('#confrencePwd').bind("input propertychange", function (event) {
        confrencePwd = $("#confrencePwd").val()
    })

</script>

</body>
</html>
